<?php
/**
 * @version $Id$
 * @package    Jmonoslideshow
 * @author     Matthieu BARBE {@link http://www.ccomca.com}
 * @author     Created on 04-Sep-2009
 */

//-- No direct access


// no direct access
defined('_JEXEC') or die();

class JElementMonoslideshowswfCheck extends JElement {
	

	function fetchElement($name, $value, &$node, $control_name)
	{
		global $params;
		$lang 		= & JFactory::getLanguage();
		//load language for component
		$lang->load('com_jmonoslideshow', JPATH_SITE);
		
		$params = &JComponentHelper::getParams( 'com_jmonoslideshow' );
		$monoslideshowswf = JPATH_SITE.DS.$params->get( 'directory', 'images/stories/monoslideshow/monoslideshow.swf' );
		$warning_style = "style='background: #FFF3A3;border: 1px solid #E7BD72;color: #B79000;display: block;padding: 8px 10px;'";
		$success_style = "style='background: #d2edc9;border: 1px solid #90e772;color: #2b7312;display: block;padding: 8px 10px;'";
		
		if (file_exists($monoslideshowswf)) {
			
			return "<span $success_style>".JText::_( 'COM_JMONOSLIDESHOW_MONOSLIDESHOW_FLASH_IS_INSTALLED' )."</span>";
		}
		else {
			
			return "<span $warning_style>".JText::_( 'COM_JMONOSLIDESHOW_MONOSLIDESHOW_FLASH_IS_NOT_INSTALLED' )."</span>";
		}
	}
	
}

?>